home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / PInterfaces / AIFF.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  4.8 KB  |  239 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        AIFF.p
  3.  
  4.      Contains:    Definition of AIFF file format components.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT AIFF;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __AIFF__}
  30. {$SETC __AIFF__ := 1}
  31.  
  32. {$I+}
  33. {$SETC AIFFIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {    ConditionalMacros.p                                            }
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46. CONST
  47.     AIFFID                        = 'AIFF';
  48.     AIFCID                        = 'AIFC';
  49.     FormatVersionID                = 'FVER';
  50.     CommonID                    = 'COMM';
  51.     FORMID                        = 'FORM';
  52.     SoundDataID                    = 'SSND';
  53.     MarkerID                    = 'MARK';
  54.     InstrumentID                = 'INST';
  55.     MIDIDataID                    = 'MIDI';
  56.     AudioRecordingID            = 'AESD';
  57.     ApplicationSpecificID        = 'APPL';
  58.     CommentID                    = 'COMT';
  59.     NameID                        = 'NAME';
  60.     AuthorID                    = 'AUTH';
  61.     CopyrightID                    = '(c) ';
  62.     AnnotationID                = 'ANNO';
  63.  
  64.     NoLooping                    = 0;
  65.     ForwardLooping                = 1;
  66.     ForwardBackwardLooping        = 2;
  67. { AIFF-C Versions }
  68.     AIFCVersion1                = $A2805140;
  69.  
  70. { Compression Names }
  71.     NoneName     = 'not compressed';
  72.     ACE2to1Name  = 'ACE 2-to-1';
  73.     ACE8to3Name  = 'ACE 8-to-3';
  74.     MACE3to1Name = 'MACE 3-to-1';
  75.     MACE6to1Name = 'MACE 6-to-1';
  76.  
  77. { Compression Types }
  78.     NoneType                    = 'NONE';
  79.     ACE2Type                    = 'ACE2';
  80.     ACE8Type                    = 'ACE8';
  81.     MACE3Type                    = 'MAC3';
  82.     MACE6Type                    = 'MAC6';
  83.  
  84.     
  85. TYPE
  86.     ID = LONGINT;
  87.  
  88.     MarkerIdType = INTEGER;
  89.  
  90.     ChunkHeader = RECORD
  91.         ckID:                    ID;
  92.         ckSize:                    LONGINT;
  93.     END;
  94.  
  95.     ContainerChunk = RECORD
  96.         ckID:                    ID;
  97.         ckSize:                    LONGINT;
  98.         formType:                ID;
  99.     END;
  100.  
  101.     FormatVersionChunk = RECORD
  102.         ckID:                    ID;
  103.         ckSize:                    LONGINT;
  104.         timestamp:                LONGINT;
  105.     END;
  106.  
  107.     FormatVersionChunkPtr = ^FormatVersionChunk;
  108.  
  109.     CommonChunk = RECORD
  110.         ckID:                    ID;
  111.         ckSize:                    LONGINT;
  112.         numChannels:            INTEGER;
  113.         numSampleFrames:        LONGINT;
  114.         sampleSize:                INTEGER;
  115.         sampleRate:                extended80;
  116.     END;
  117.  
  118.     CommonChunkPtr = ^CommonChunk;
  119.  
  120.     ExtCommonChunk = RECORD
  121.         ckID:                    ID;
  122.         ckSize:                    LONGINT;
  123.         numChannels:            INTEGER;
  124.         numSampleFrames:        LONGINT;
  125.         sampleSize:                INTEGER;
  126.         sampleRate:                extended80;
  127.         compressionType:        ID;
  128.         compressionName:        PACKED ARRAY [0..0] OF CHAR;            { variable length array, Pascal string }
  129.     END;
  130.  
  131.     ExtCommonChunkPtr = ^ExtCommonChunk;
  132.  
  133.     SoundDataChunk = RECORD
  134.         ckID:                    ID;
  135.         ckSize:                    LONGINT;
  136.         offset:                    LONGINT;
  137.         blockSize:                LONGINT;
  138.     END;
  139.  
  140.     SoundDataChunkPtr = ^SoundDataChunk;
  141.  
  142.     Marker = RECORD
  143.         id:                        MarkerIdType;
  144.         position:                LONGINT;
  145.         markerName:                Str255;
  146.     END;
  147.  
  148.     MarkerChunk = RECORD
  149.         ckID:                    ID;
  150.         ckSize:                    LONGINT;
  151.         numMarkers:                INTEGER;
  152.         Markers:                ARRAY [0..0] OF Marker;                    { variable length array }
  153.     END;
  154.  
  155.     MarkerChunkPtr = ^MarkerChunk;
  156.  
  157.     AIFFLoop = RECORD
  158.         playMode:                INTEGER;
  159.         beginLoop:                MarkerIdType;
  160.         endLoop:                MarkerIdType;
  161.     END;
  162.  
  163.     InstrumentChunk = PACKED RECORD
  164.         ckID:                    ID;
  165.         ckSize:                    LONGINT;
  166.         baseFrequency:            UInt8;
  167.         detune:                    UInt8;
  168.         lowFrequency:            UInt8;
  169.         highFrequency:            UInt8;
  170.         lowVelocity:            UInt8;
  171.         highVelocity:            UInt8;
  172.         gain:                    INTEGER;
  173.         sustainLoop:            AIFFLoop;
  174.         releaseLoop:            AIFFLoop;
  175.     END;
  176.  
  177.     InstrumentChunkPtr = ^InstrumentChunk;
  178.  
  179.     MIDIDataChunk = RECORD
  180.         ckID:                    ID;
  181.         ckSize:                    LONGINT;
  182.         MIDIdata:                PACKED ARRAY [0..0] OF SInt8; (* UInt8 *) { variable length array }
  183.     END;
  184.  
  185.     MIDIDataChunkPtr = ^MIDIDataChunk;
  186.  
  187.     AudioRecordingChunk = RECORD
  188.         ckID:                    ID;
  189.         ckSize:                    LONGINT;
  190.         AESChannelStatus:        PACKED ARRAY [0..23] OF SInt8; (* UInt8 *)
  191.     END;
  192.  
  193.     AudioRecordingChunkPtr = ^AudioRecordingChunk;
  194.  
  195.     ApplicationSpecificChunk = RECORD
  196.         ckID:                    ID;
  197.         ckSize:                    LONGINT;
  198.         applicationSignature:    OSType;
  199.         data:                    PACKED ARRAY [0..0] OF SInt8; (* UInt8 *) { variable length array }
  200.     END;
  201.  
  202.     ApplicationSpecificChunkPtr = ^ApplicationSpecificChunk;
  203.  
  204.     Comment = RECORD
  205.         timeStamp:                LONGINT;
  206.         marker:                    MarkerIdType;
  207.         count:                    INTEGER;
  208.         text:                    PACKED ARRAY [0..0] OF CHAR;            { variable length array, Pascal string }
  209.     END;
  210.  
  211.     CommentsChunk = RECORD
  212.         ckID:                    ID;
  213.         ckSize:                    LONGINT;
  214.         numComments:            INTEGER;
  215.         comments:                PACKED ARRAY [0..0] OF Comment;            { variable length array }
  216.     END;
  217.  
  218.     CommentsChunkPtr = ^CommentsChunk;
  219.  
  220.     TextChunk = RECORD
  221.         ckID:                    ID;
  222.         ckSize:                    LONGINT;
  223.         text:                    PACKED ARRAY [0..0] OF CHAR;            { variable length array, Pascal string }
  224.     END;
  225.  
  226.     TextChunkPtr = ^TextChunk;
  227.  
  228.  
  229. {$ALIGN RESET}
  230. {$POP}
  231.  
  232. {$SETC UsingIncludes := AIFFIncludes}
  233.  
  234. {$ENDC} {__AIFF__}
  235.  
  236. {$IFC NOT UsingIncludes}
  237.  END.
  238. {$ENDC}
  239.